<#include "../header.ftl">
<html>
<head>
    <link href="../../static/js/plugins/ztree/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css"/>
</head>
<body>

<#include "../nav-top.ftl">
<div class="sui-container" style="margin-top: 30px;">
    <ul class="sui-breadcrumb" style="padding: 0px 0px">
        <li><a href="#">渠道管理</a></li>
        <li><a href="#">渠道操作</a></li>
        <li class="active">新增渠道</li>
    </ul>

    <div class="sui-row-fluid">

        <div class="span12">
            <form id="form-channel" class="sui-form form-horizontal" novalidate="novalidate">
                <div class="control-group">
                    <label for="channelName">渠道名称：</label>
                    <div class="controls">
                        <input type="text" class="input-large" id="channelName" name="channelName" placeholder="渠道名称"
                               data-rules="required">
                    </div>
                    &nbsp;&nbsp;
                    <label for="plateformType">平台：</label>
                    <div class="controls">
                        <select class="input-large" id="plateformType">
                        <#list plateformType as type>
                            <option value="${type.codeValue}">${type.codeName}</option>
                        </#list>
                        </select>
                    </div>
                    &nbsp;&nbsp;
                </div>
                <div class="control-group">
                    <label for="channelRemark">备　　注：</label>
                    <div class="controls">
                        <textarea id="channelRemark" name="channelRemark" rows="3" class="input-xxlarge"
                                  maxlength="100"></textarea>
                    </div>
                </div>
                <div class="control-group">
                    <button href="javascript:void(0);"
                            class="sui-btn btn-xlarge btn-primary create-channel create-channel">创建
                    </button>
                    &nbsp;
                    <a href="/user/toAdd" class="sui-btn btn-xlarge btn-primary">创建账号</a>&nbsp;
                    <a href="/channel" class="sui-btn btn-xlarge btn-info">返回</a>
                </div>
            </form>

        </div>
    </div>

</div>
<div class="sui-container grid-demo" style="margin-top: 30px;">
    <div class="sui-row-fluid">
        <div class="span12">
            <ul class="sui-nav nav-tabs nav-xlarge nav-primary">
                <li class="active"><a href="#qudao" data-toggle="tab">可添加游戏</a></li>
                <li><a href="#zhanghao" data-toggle="tab">已添加游戏</a></li>
            </ul>
            <div class="tab-content">
                <div id="qudao" class="tab-pane active">
                    <form id="form-msg" class="sui-form form-horizontal" novalidate="novalidate">
                        <div class="control-group">
                            <label for="gameName1">游戏名称：</label>
                            <div class="controls">
                                <input type="text" class="input-large" id="gameName1" name="gameName1"
                                       placeholder="游戏名称" data-rules="required">
                            </div>
                            &nbsp;&nbsp;
                            <label for="plateformType1">平台类型：</label>
                            <div class="controls">
                                <select class="input-large" id="plateformType1">
                                    <option value="">全部</option>
                                <#list plateformType as type>
                                    <option value="${type.codeValue}">${type.codeName}</option>
                                </#list>
                                </select>
                            </div>
                            &nbsp;&nbsp;
                            <label for="gameType1">游戏类型：</label>
                            <div class="controls">
                                <select class="input-large" id="gameType1">
                                    <option value="">全部</option>
                                <#list gameType as game>
                                    <option value="${game.codeValue}">${game.codeName}</option>
                                </#list>
                                </select>
                            </div>
                            &nbsp;&nbsp;
                            <a href="javascript:void(0);" class="sui-btn btn-large query-add">查询</a>&nbsp;
                            <button type="button" href="javascript:void(0);" class="sui-btn btn-large add-game-all"
                                    disabled="disabled">添加
                            </button>
                        </div>
                    </form>
                    <table class="sui-table table-bordered  rowover-table" id="tab-add">
                        <thead>
                        <tr>
                            <th><input type="checkbox" class="check-add"/></th>
                            <th>游戏LOGO</th>
                            <th>游戏名称</th>
                            <th>平台</th>
                            <th>类型</th>
                            <th>混服情况</th>
                            <th>大小</th>
                            <th>版本</th>
                            <th>游戏说明</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
                    <div class="sui-pagination pagination-large add-pagination" style="float: right">
                        <ul>
                            <li class="prev disabled"><a href="#">«上一页</a></li>
                            <li class="next"><a href="#">下一页»</a></li>
                        </ul>
                    </div>
                </div>
                <div id="zhanghao" class="tab-pane">
                    <form id="form-msg" class="sui-form form-horizontal" novalidate="novalidate">
                        <div class="control-group">
                            <label for="gameName2">游戏名称：</label>
                            <div class="controls">
                                <input type="text" class="input-large" id="gameName2" name="gameName2"
                                       placeholder="游戏名称" data-rules="required">
                            </div>
                            &nbsp;&nbsp;
                            <label for="plateformType2">平台类型：</label>
                            <div class="controls">
                                <select class="input-large" id="plateformType2">
                                <#list plateformType as type>
                                    <option value="${type.codeValue}">${type.codeName}</option>
                                </#list>
                                </select>
                            </div>
                            &nbsp;&nbsp;
                            <label for="gameType2">游戏类型：</label>
                            <div class="controls">
                                <select class="input-large" id="gameType2">
                                    <option value="">全部</option>
                                <#list gameType as game>
                                    <option value="${game.codeValue}">${game.codeName}</option>
                                </#list>
                                </select>
                            </div>
                            &nbsp;&nbsp;
                            <a href="javascript:void(0);" class="sui-btn btn-large query-del">查询</a>&nbsp;
                            <a href="javascript:void(0);" class="sui-btn btn-large del-game-all">删除</a>
                        </div>
                    </form>
                    <table class="sui-table table-bordered rowover-table" id="tab-del">
                        <thead>
                        <tr>
                            <th><input type="checkbox" class="check-del"/></th>
                            <th>游戏LOGO</th>
                            <th>游戏名称</th>
                            <th>平台</th>
                            <th>类型</th>
                            <th>混服情况</th>
                            <th>大小</th>
                            <th>版本</th>
                            <th>游戏说明</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>


                        </tbody>
                    </table>
                    <div class="sui-pagination pagination-large del-pagination" style="float: right">
                        <ul>
                            <li class="prev disabled"><a href="#">«上一页</a></li>
                            <li class="next"><a href="#">下一页»</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<#include "../footer.ftl">
<script src="../../static/js/plugins/sea/sea.js"></script>
<script src="../../static/js/sea.config.js"></script>
<script>
    seajs.use('/static/js/game/channel/add');
</script>

<script id="tp-add" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var game = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="channel-add-id" value="<%= game.gameId %>"/></td>
        <td></td>
        <td><%= game.gameName %></td>
        <td><%= game.plateformType %></td>
        <td><%= game.gameType %></td>
        <td><%= game.gameService %></td>
        <td><%= game.gameSize %></td>
        <td><%= game.gameVersion %></td>
        <td><%= game.gameRemark %></td>
        <td>
            <a href="javascript:void(0);" class="sui-btn btn-link btn-small ">查看</a>
        <#--<a href="javascript:void(0);" class="sui-btn btn-link btn-small add-game"-->
        <#--data-id="<%= game.gameId %>" data-name="<%= game.gameName %>">添加</a>-->
        </td>
    </tr>
    <% } %>
</script>

<script id="tp-del" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var game = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="channel-del-id" value="<%= game.gameId %>"/></td>
        <td></td>
        <td><%= game.gameName %></td>
        <td><%= game.plateformType %></td>
        <td><%= game.gameType %></td>
        <td><%= game.gameService %></td>
        <td><%= game.gameSize %></td>
        <td><%= game.gameVersion %></td>
        <td><%= game.gameRemark %></td>
        <td>
            <a href="javascript:void(0);" class="sui-btn btn-link btn-small ">查看</a>
        <#--<a href="javascript:void(0);" class="sui-btn btn-link btn-small ">删除</a>-->
            <a href="javascript:void(0);" class="sui-btn btn-link btn-small ">下载链接</a>
            <a href="javascript:void(0);" class="sui-btn btn-link btn-small ">二维码</a>
        </td>
    </tr>
    <% } %>
</script>
</body>
</html>
